package com.wxxymaker.model.entity;

import com.blade.kit.json.JsonFormat;
import com.blade.kit.json.JsonIgnore;
import com.blade.kit.json.MappingType;
import io.github.biezhi.anima.Model;
import io.github.biezhi.anima.annotation.Column;
import io.github.biezhi.anima.annotation.Ignore;
import io.github.biezhi.anima.annotation.Table;

import java.util.Date;

/**
 * @Author: Soft
 * @Date: 2018/6/2 21:18
 * @Desc: 文章表
 */
@Table(name = "article")
public class Article extends Model {
	private Integer id;
	private String type;    // 文章类型
	private String title;   // 标题
	private String intro;   // 简介
	@JsonFormat(value = "yyyy-MM-dd HH:mm:ss")
	private Date   time;    // 时间
	private int    status;  // 状态
	private int    views;   // 浏览量
	private int    likes;   // 点赞数
	private String path;    // 文章路径
	private String photo;   // 图片路径

	@Column(name = "flag_key")
	private String flagKey; // 用来与图片关联的key

	@Ignore
	@JsonIgnore
	private String content; // 临时保存request中的文章内容

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getIntro() {
		return intro;
	}

	public void setIntro(String intro) {
		this.intro = intro;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getViews() {
		return views;
	}

	public void setViews(int views) {
		this.views = views;
	}

	public int getLikes() {
		return likes;
	}

	public void setLikes(int likes) {
		this.likes = likes;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getFlagKey() {
		return flagKey;
	}

	public void setFlagKey(String flagKey) {
		this.flagKey = flagKey;
	}

	public interface Type {
		String RESULT = "result";
		String NEWS   = "news";
		String NOTICE = "notice";
	}
}
